/// Create by kyluzoi
/// Date: 2021-07-30
///
/// Description: 定义网络请求错误异常  ---- 自行补充

/// 未登录异常
class UnLoginError implements NetWorkBaseError {
  @override
  int get code => 401;

  @override
  String get message => "请先登录";
}

/// 未授权异常
class UnAuthError implements NetWorkBaseError {
  @override
  int get code => 403;

  @override
  String get message => "非法的访问";
}

class NetWorkBaseError {
  final int code;
  final String message;

  NetWorkBaseError(this.code, this.message);

  @override
  String toString() {
    return "code:$code ----> message:$message";
  }
}
